﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BugTracker.BusinessLogic.ReportedBy
{
    public class ReportedByMapper : IReportedByMapper
    {
        #region IReportedByMapper Members

        public DataAccess.Data.ReportedBy Map(BusinessEntities.Entities.ReportedBy.ReportedBy value)
        {
            DataAccess.Data.ReportedBy result = new DataAccess.Data.ReportedBy();
            result.ReportedByID = value.ReportedByID;
            result.CompanyID = value.CompanyID;
            result.FirstName = value.FirstName;
            result.LastName = value.LastName;
            result.WorkPhone = value.WorkPhone;
            result.MobilePhone = value.MobilePhone;
            result.Email = value.Email;
            result.Detail = value.Detail;
            result.UserTypeID = value.UserTypeID;
            result.IsActive = value.IsActive;
            result.IsDeleted = value.IsDeleted;
            result.RowGuid = value.RowGuid;
            result.CreatedOn = value.CreatedOn;
            result.ModifiedOn = value.ModifiedOn;
            return result;
        }

        public BusinessEntities.Entities.ReportedBy.ReportedBy Map(DataAccess.Data.ReportedBy value)
        {
            BusinessEntities.Entities.ReportedBy.ReportedBy result = 
                new BusinessEntities.Entities.ReportedBy.ReportedBy();
            result.ReportedByID = value.ReportedByID;
            result.CompanyID = value.CompanyID;
            result.FirstName = value.FirstName;
            result.LastName = value.LastName;
            result.WorkPhone = value.WorkPhone;
            result.MobilePhone = value.MobilePhone;
            result.Email = value.Email;
            result.Detail = value.Detail;
            result.UserTypeID = value.UserTypeID;
            result.IsActive = value.IsActive;
            result.IsDeleted = value.IsDeleted;
            result.RowGuid = value.RowGuid;
            result.CreatedOn = value.CreatedOn;
            result.ModifiedOn = value.ModifiedOn;
            return result;
        }

        public void Map(DataAccess.Data.ReportedBy result, BusinessEntities.Entities.ReportedBy.ReportedBy value, bool includeKey = false)
        {
            if (includeKey)
            {
                value.ReportedByID = result.ReportedByID;
            }
            result.CompanyID = value.CompanyID;
            result.FirstName = value.FirstName;
            result.LastName = value.LastName;
            result.WorkPhone = value.WorkPhone;
            result.MobilePhone = value.MobilePhone;
            result.Email = value.Email;
            result.Detail = value.Detail;
            result.UserTypeID = value.UserTypeID;
            result.IsActive = value.IsActive;
            result.IsDeleted = value.IsDeleted;
            result.RowGuid = value.RowGuid;
            result.CreatedOn = value.CreatedOn;
            result.ModifiedOn = value.ModifiedOn;
        }

        public void Map(BusinessEntities.Entities.ReportedBy.ReportedBy result, DataAccess.Data.ReportedBy value, bool includeKey = false)
        {
            if (includeKey)
            {
                value.ReportedByID = result.ReportedByID;
            }
            value.CompanyID = result.CompanyID;
            value.FirstName = result.FirstName;
            value.LastName = result.LastName;
            value.WorkPhone = result.WorkPhone;
            value.MobilePhone = result.MobilePhone;
            value.Email = result.Email;
            value.Detail = result.Detail;
            value.UserTypeID = result.UserTypeID;
            value.IsActive = result.IsActive;
            value.IsDeleted = result.IsDeleted;
            value.RowGuid = result.RowGuid;
            value.CreatedOn = result.CreatedOn;
            value.ModifiedOn = result.ModifiedOn;
        }

        #endregion
    }
}
